/**
 * 
 */
package at.jku.ssw.fortress.ui.outline;

import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;

public final class OutlineContentProvider implements ITreeContentProvider {
	public Object[] getChildren(Object e) {
		Definition def = (Definition) e;
		return def.getChildren();
	}

	public Object getParent(Object e) {
		Definition def = (Definition) e;
		return def.getParent();
	}

	public boolean hasChildren(Object e) {
		Definition def = (Definition) e;
		return def.hasChildren();
	}

	public Object[] getElements(Object inputElement) {
		if (inputElement != null) {
			Definition def = (Definition) inputElement;
			return def.getChildren();
		}
		return new Object[0];
	}

	public void dispose() {

	}

	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

	}
}